<template>
    <div class="bod">
       <div class="content">
           <ul>
               <li class="content_li" v-for="item in Address_list" :key="item.id">
                   <div class="content_Name" @click="SelectAddress(item.id)">
                       {{item.userName | capitalize1()}}
                   </div>
                   <div class="content_moud"  @click="SelectAddress(item.id)">
                        <h1>{{item.userName}} <span>{{item.mobile}}</span></h1>
                        <p><span v-if="1==item.addressType">默认</span>{{item.province}} {{item.city}} {{item.district}} {{item.address}}</p>
                   </div>
                    <div class="content_left" @click="edit(item.id)">
                        <div class="xian"></div>
                         <img src="../../../assets/personal/images/BIAOZ_03.gif">
                         <h1>编辑</h1>
                    </div>
                    <div class="clearfix"></div>
               </li>
           </ul>
       </div>
       <router-link :to="{name:'newaddaddress'}">
            <div class="footer">
                <span>添加新地址</span>
            </div>
       </router-link>
    </div>
</template>
<script>
export default {
    data () {
        return {
            Address_list:[]
        }
    }
    ,mounted(){
       this.Address()
    },
    methods:{
         edit:function(id){
             this.$router.push({name:'newaddaddress',query:{addID:id}})
         },
         Address(){
          this.$http.get(this.APIURL_PREFIX + '/api/wap/receivingAddress',{ params: {} }).then((response) => {
             this.Address_list=response.data.data
         }).catch(function (err) {
                console.log(err)
         });
      },
      SelectAddress:function(id){
           this.$router.push({name:'details_list_jiesuan',query:{addID:id}})
      }
    }
}
</script>

<style scoped>
.region_dingwei {
        height: 100%;
        line-height: 100%;
        padding: 18px;
        width: 100%;
        text-align: right;
    }
.clearfix{
    clear: both;
}
.bod{
    width: 100%;
    background: #f2f2f2;
}
.content{
    height: 600px;
    overflow: scroll;
}
.content_li{
    padding: 20px 0;
    position: relative;
}
.content_Name{
    margin-left: 5px;
    float: left;
    width: 32px;
    height: 42px;
    background: #b7b8b8;
    text-align: center;
    line-height: 42px;
    font-size: 16px;
    border: none;
    border-radius: 50%;
    margin-top: 7px;
}
.content_moud{
    margin-top: -5px;
    width: 263px;
    float: left;
    text-align: left;
    margin-left: 10px;
}
.content_moud h1{
    font-size: 15px;
}
.content_moud h1 span{
    font-size: 13px;
    color: #999999;
}
.content_moud p{
    margin: 10px 0;
    line-height: 20px;
}
.content_moud p span{
   padding:3px;
   margin: 0 3px;
   background: #ffcece;
   border-radius: 5px;
}
.content_left{
    float:right;
    width: 50px;
    padding-top: 15px;
    
}
.content_left img{
    width: 20px;
    height: 20px;
    vertical-align: middle;
}
.content_left h1{
    font-size: 12px;
    line-height: 20px;
}
.xian{
   width: 1px;
   border-left: 1px solid red;
   height: 40px;
   position: absolute;
   top:30px;
}
.footer{
    width: 100%;
    height: 53px;
    background: red;
    position: fixed;
    bottom: 0;
}
.footer span{
    text-align: center;
    line-height: 53px;
    font-weight: 400;
    color: white;
    font-size: 18px;
}
</style>

